function X=vec(X)
% vec: This program vectorizes the matrix X.
% Diego R. K�nzig. This version: 18/03/2017

X=X(:);